package org.jeecg.modules.nikeProject.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.modules.nikeProject.service.ISportsProjectService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Calendar;

@Slf4j
public class ProjectAverageOrdinaryJob implements Job {
    @Autowired
    private ISportsProjectService sportsProjectService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("-----------------执行普通评审的综合平均分计算定时任务开始！！！----------------");
        Calendar calendar = Calendar.getInstance();
        sportsProjectService.averageScore(CommonConstant.REVIEW_TYPE_SENIOR, calendar.get(Calendar.YEAR));
        log.info("-----------------执行普通评审的综合平均分计算定时任务结束！！！-------------------------");
    }


}
